// Copyright (c)  YISH. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

namespace NSQL.Extensions
{
    public static class AliasExtensions
    {
        internal static bool HasAlias(this IHasAlias self)
        {
            return !string.IsNullOrWhiteSpace(self.Alias);
        }

        public static T SetAlias<T>(this T self, Identifier alias) where T : IHasAlias
        {
            self.Alias = alias;
            return self;
        }
    }
}